{% extends "WileadUserManagerBundle::layout.html.twig" %}

{% block container -%}
    <form method="get" action="">
        {{ form_rest(filter) }}
        <input class="btn btn-info" type="submit" name="submit-filter" value="搜索"/>
        <a class="btn" href="{{ path('manager_user') }}">清空条件</a>
    </form>
    <h1>用户管理</h1>
    <table class="table">
        <thead>
        <tr>
            <th>id</th>
            <th>手机</th>
            <th>呢称</th>
            <th>性别</th>
        </tr>
        </thead>
        <tbody>
        {% for entity in entities %}
            <tr>
                <td>{{ entity.id }}</a></td>
                <td>{{ entity.mobile }}</td>
                <td>{{ entity.nickname }}</td>
                <td>{% if entity.sex == 'm' %}男{% endif %}{% if entity.sex == 'f' %}女{% endif %}</td>
            </tr>
        {% endfor %}
        </tbody>
    </table>
    <div class="navigation">
        {{ knp_pagination_render(entities) }}
    </div>
{% endblock %}